package com.company.management.modal.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@NoArgsConstructor
@TableName("t_user")
@ApiModel(description = "用户信息模型")
public class User {
    @TableId(type= IdType.AUTO)
    private Integer userId;
    private String avatar;
    private String userName;
    private String password;
    private String tel;
    private String gender;
    private Integer deptId;
    private Integer postId;
    private LocalDate hireDate;
    private Integer empStatus;
    private String company;
    private Integer score;
    private Integer isAdmin;
    @TableField(value = "token")
    private String token;

    @ApiModelProperty(value = "token更新时间")
    @TableField(fill=FieldFill.INSERT_UPDATE)
    private LocalDateTime tokenUpdateTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill= FieldFill.INSERT)
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
